#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

#include<list>
#include<vector>
#include<algorithm>
using namespace std;
//#include"priority_queue.h"
#include"list.h"
//int main()
//{
//	wdz::priority_queue<int> q;
//	q.push(1);
//	q.push(9);
//	q.push(3);
//	q.push(6);
//	q.push(5);
//	while (!q.empty())
//	{
//		cout << q.top() << endl;
//		q.pop();
//	}
//	return 0;
//}

int main()
{
	xlh::list<int> l;
	l.push_back(1);
	l.push_back(2);
	l.push_back(3);
	l.push_back(4);
	l.push_back(5);
                           
	xlh::list<int>::iterator it = l.begin();
	while (it != l.end())
	{
		cout << *it << " ";
		it++;
	}
	cout << endl;

	xlh::list<int>::reverse_iterator rit = l.rbegin();
	while (rit != l.rend())
	{
		cout << *rit << " ";
		++rit;
	}

	return 0;
}